package actionScripts
{
	import actionScripts.vo.LoggedInUser;
	import actionScripts.vo.UserDetail;
	
	import flash.events.EventDispatcher;
	import flash.events.IEventDispatcher;

	[Bindable]
	public class LoginModelLocator extends EventDispatcher
	{
		//---------------------
		// PRIVATE VARIABLES
		//---------------------
		private static var instance : LoginModelLocator;
		
		public var applicationStage :HomeAppLogin;
		public var usrDetail        :UserDetail = new UserDetail();
		public var loggedUser		:LoggedInUser;
		
		/**
		 * CONSTRUCTOR
		 */
		public function LoginModelLocator() {
			
			if ( instance != null ) {
				throw new Error( "This is a singleton class. Can not create multiple instances." );
			}
			instance = this;
			
		}
		
		/**
		 * Returns the Singlton Instance
		 */
		public static function getInstance() : LoginModelLocator {
			
			if ( instance == null ) {
				instance = new LoginModelLocator();
			}
			return instance;
			
		}
	}
}